package com.wulinbus.dao.user;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.wulinbus.model.UserModel;

public interface UserDAO {

	public void addPerUser(UserModel userModel);
	public void addCompUser(UserModel userModel);
	public void delete(UserModel userModel);

	public List<UserModel> getListByUid(List<Integer> uids);
	
	public UserModel login(Map<String, Object> param);
	public UserModel adminLogin(Map<String, Object> param);
	public Integer getMaxId();
	public void insertUserRole(Map<String,Object> param);
	public void insertPerUser(UserModel userModel);
	public void insertCompUser(UserModel userModel);
	public void addCreative(UserModel userModel);
	public UserModel findUserByEmail(String email);
	public UserModel findUserByTitle(String title);
	public UserModel creativeExist(String title);
	public Integer count();
	public long getMaxCid();
	public void addCoverUrl(UserModel userModel);
	public void addMatterUrl(UserModel userModel);
	public Integer findUidByEmail(String email);
	public void addCreativeUrl(UserModel userModel_C);
	public UserModel findUserByComp(String comp);
	
	public UserModel findUserByUid(@Param("uid") Integer uid);
	
	public String findCompByUid(@Param("uid") Integer uid);
	public List<Integer> findUidByKeyAuthor(@Param("search") String search);
	public List<UserModel> findUserByKeyAuthor(@Param("search") String search);
	public void addLoginTime(@Param("uid")Integer uid, @Param("login_time")String login_time);
	public Integer getRoleByUid(@Param("uid") Integer uid);
	public Integer addBalance(@Param("uid")Integer uid, @Param("money")Float money);
	
	public List<UserModel> getList(@Param("start")Integer start, @Param("count")Integer count);
	public Integer getListCount();
	
	public Integer updateUser(UserModel user);
	public void updateBalanceOfNumOne(@Param("collect_budget") Integer collect_budget,@Param("sid") Integer sid);
	public void updateBalanceOfCollector(@Param("collect_budget") Float collect_budget,@Param("sid") Integer sid);
}
